1. Field of the Invention
The present invention relates to a control packet loop prevention method and a bridge apparatus using the method. More particularly, the present invention relates to a control packet loop prevention method and a bridge apparatus using the method in a network in which node redundancy or circuit redundancy is realized by using RSTP (Rapid Spanning Tree Protocol) or MSTP (Multiple Spanning Tree Protocol).
2. Description of the Related Art
The RSTP (Rapid Spanning Tree Protocol) that is standardized in IEEE 802.1w/1y is a protocol for realizing node redundancy or circuit redundancy in a network using layer 2 switches.
The RSTP is known as a protocol for logically establishing a tee having no loop by using parameters such as bridge priorities and the like that are set in bridges (layer 2 switches). In RSTP, a topology of a network can be switched to a new topology within several seconds when a topology change occurs due to parameter change or due to line failure or the like.
FIG. 1A shows an example of a network configuration. In the network, bridges #1-#4 that are layer 2 switches are connected with each other. In the figure, a root bridge is a bridge having a strongest (smallest) bridge priority. A root bridge exists in a tree and the tree is formed centering the root bridge. In the figure, the bridge 1 is the root bridge. Each of the bridges #1-#4 has the priority value of the root bridge.
Among the bridges #1-#4, a BPDU (Bridge Protocol Data Unit that is control packet for RSTP) including items shown in FIG. 2 is sent and received so that each bridge is notified of a strength of each bridge or ports of the bridge, parameters for STP for determining operation conditions of RSTP such as a hallo time. In addition, each bridge is notified of an after-mentioned message age. Accordingly, information of the root bridge is transferred from the root bridge to each branch (end of tree).
As a port in a bridge, there are three types of ports: a designated port (shows as a black circle in figures), a root port (white circle) and an alternate port (2 lines). The designated port is a port extending from the root bridge side to an end side of a tree. The root port is connected to the designated port and receives a main signal and the BPDU. The alternate port is connected to the designated port, and the alternate port blocks the main signal but receives the BPDU.
The message age in the BPDU shown in FIG. 2 indicates a term of validity of the BPDU. Each time when the message age is transferred by a bridge, a larger value between 1 and an integer part of (max edges)/16 is added to the message age. A BPDU having a message age equal to or larger than the max age is invalid so that the BPDU is discarded. A path cost is a value used for weighting a route via which the BPDU is transferred. Each time when the BPDU is received, a value assigned to an input port is added to the path cost. The smaller the path cost is, the more favorable the route is. The hello time indicates a time interval at which the BPDU is transmitted. A default value of the hello time is 2 seconds.
In the RSTP, a tree that does not have any loop as shown in FIG. 1B is constituted by exchanging strength information and the like of bridge/port by using the BPDU among bridges. Then, as shown in FIG. 3A, when a failure occurs between bridges #1 and #3 or when a parameter is changed, a new tree as shown in FIG. 3B is formed.
Japanese Laid Open Patent Application 11-168491 discloses a system having a counter for counting a number of relay frames in which the counter is cleared each time when a BPDU frame is receives, and when the value of the counter becomes larger than a predetermined value, it is judged that a loop occurs so that frame relaying is stopped.
In a network in which four bridges #1-#4 are connected, assuming that the bridge priority of the bridge #1 that is the route bridge is changed from “4096” to “20480”. In this case, strength relationships to other bridges #2-#4 are changed so that a topology change occurs. In the figure, “RBID” indicates a root bridge ID in the BPDU, and MA indicates a message age. The root bridge ID includes the bridge priority of the root bridge and MAC address #1 of the root bridge.
In this case, the bridges #2 and #3 age out (discard) the bridge priority (=4096) of the bridge #1 at the same time, and each bridge updates bridge priority of a root bridge by using a received BPDU, so that a new RSTP tree shown in FIG. 5B is established after a few second.
However, as a matter of fact, the timing at which the aging out of the bridge priority of the bridge #1 is performed is different between the bridges #2 and #3. Thus, there is a possibility that a BPDU is transmitted among the bridges #2-#4 as if the bridge priority of the bridge #1 remains 4096.
That is, right after the bridge #2 ages out the information, the bridge #2 insists that the bridge #2 itself is the root bridge (2). However, since the bridge #3 has not aged out, the bridge #3 transmits the former bridge priority=4096 of the bridge #1 to the bridge #2 (3). The bridge #2 transfers the bridge priority to a neighboring bridge (4).
Thus, the priority is transferred to the bridges #3, #2, #4 and then #3. At this time, as shown in FIG. 5A, if the bridge #3 ages out the bridge priority of the root bridge, the bridge #3 further transfers the bridge priority=4096, so that the priority is transferred to the bridges #2, #4, #3, #2 and #4 in this order. As a result, a loop is formed among the bridges #2, #3 and #4.
The looping BPDU continues to exist as long as the message age value in the BPDU is equal to or smaller than the max age value. Thus, for example, since a default max age is 20, the looping BPDU continues to exist while the BPDU is being transferred through 20 bridges at the maximum. That is, the looping BPDU exists for more than 10 seconds.
The above-mentioned explanation is based on a case where there is one loop for the sake of simplicity. If there are a plurality of loops, the above-mentioned operations are intertwined with each other, so that there is a possibility that it may take several minutes at the maximum until the looping BPDU disappears after a bridge priority change is performed. For example, also in the case shown in FIGS. 4A-4B and 5A-4B, there is a possibility that a loop may occur in bridges #1, #2 and #3 and in bridges #1, #2, #3 and #4. Thus, there is a problem in that it takes a long time to switch a tree.
In this case, since a new RSTP tree is constructed after the BPDU having the bridge priority 4096 of the bridge #1 disappears, it may take several minutes at the maximum to generate a new tree. Off course, the main signal is disconnected for the same time interval as the tree reconstructing time.
This phenomenon may occur not only when the bridge priority is changed but also when a node failure (failure of BPDU sending function and the like) in the root bridge #1 occurs. In addition, this phenomenon may occur for MSTP defined in IEEE802.1s in the same way.